/**
 * Created by Administrator on 2019/7/1.
 */
new Vue({
    el:"#app",
    data:{
        message:"hello woof"
    },
    mounted(){
        axios
            .get("json/tsconfig.json")
            .then(response => (this.message = response.data.compilerOptions))
        .catch  (function (error) {
            console.log(error)
        });
     }
});
//返回顶部
var t = document.querySelector("#fh");
window.onscroll = function () {
    console.log(document.documentElement.scrollTop > 50 || document.body.scrollTop > 50);
    if (document.documentElement.scrollTop > 50 || document.body.scrollTop > 50){
        t.style.display = "block";
    }else {
        t.style.display = "none";
    }
};
t.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'})
});
